import Vue from 'vue';
import Noticetor from './Notice.vue';
const NotificationConstructor = Vue.extend(Noticetor);

let instance;
let seed = 1;
const Noticetors = function(options) {
  const id = 'noticetors_' + seed++;
  instance = new NotificationConstructor({
    data: options
  });
  instance.id = id;
  instance.$mount();
  document.body.appendChild(instance.$el);
  instance.dom = instance.$el;
  instance.dom.style.zIndex = 9999;
  return instance;
}
export default {
  install(Vue) {
    Vue.prototype.$noticetors = Noticetors;
  }
}
